//
//  KZVovabularyPackageModel.m
//  听说弱点强化训练
//
//  Created by 朱凯 on 2018/8/23.
//  Copyright © 2018年 盛超. All rights reserved.
//

#import "KZVocabularyPackageModel.h"

@implementation KZVocabularyPackageModel


+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"currentPackage" : @[@"ModelListenSayVocabularyPackage",
                                   @"ModelUnfamiliarVocabularyPackage"]};
}

@end

@implementation KZVocabularyCurrentPackageModel

+ (NSDictionary *)modelContainerPropertyGenericClass {
    return @{
             @"Detail":[KZVocabularyCurrentPackageDetailModel class]
             };
}

@end

@implementation KZVocabularyCurrentPackageDetailModel

- (BOOL)yy_modelSetWithDictionary:(NSDictionary *)dic {
    [super yy_modelSetWithDictionary:dic];
    
    NSString *updateTime = dic[@"UpdateTime"];
    updateTime = [updateTime componentsSeparatedByString:@"."].firstObject;
    updateTime = [updateTime stringByReplacingOccurrencesOfString:@"T" withString:@" "];
    NSDateFormatter *f = [[NSDateFormatter alloc] init];
    f.dateFormat = @"yyyy-MM-dd HH:mm:ss";
    self.UpdateTime = [f dateFromString:updateTime];
    
    return true;
}

@end

